package com.battery.system.domain;

import com.battery.common.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 合作商对象 ws_partner
 *
 * @author battery
 * @date 2021-01-21
 */
@Table(name = "ws_partner")
public class Partner {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @Id
    @KeySql(useGeneratedKeys = true)
    private String id;

    /**
     * 合作商姓名
     */
    @Excel(name = "合作商姓名")
    private String fullName;

    /**
     * 合作商联系方式
     */
    @Excel(name = "合作商联系方式")
    private String phone;

    /**
     * 合作商类型
     */
    @Excel(name = "合作商类型")
    private Long subjectType;

    /**
     * 分成比例
     */
    private BigDecimal shareRatio;

    /**
     * 平台分润比例
     */
    private BigDecimal projectShareRatio;

    /**
     * 签约时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "签约时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date signingTime;

    /**
     * 上级合作商ID
     */
    @Excel(name = "上级合作商ID")
    private String parentId;

    /**
     * 平台ID
     */
    @Excel(name = "平台ID")
    private String projectId;

    /**
     * 可提现金额
     */
    @Excel(name = "可提现金额")
    private BigDecimal cashoutMoney;

    /**
     * 已冻结金额
     */
    @Excel(name = "已冻结金额")
    private BigDecimal frozenMoney;

    /**
     * 祖级列表
     */
    private String ancestors;

    /**
     * 备注
     */
    private String remarks;

    /**
     * 是否删除
     */
    private Integer isDelete;


    /**
     * 直营营业额
     */
    @Excel(name = "直营营业额")
    private BigDecimal directTurnover;

    /**
     * 直营收益
     */
    @Excel(name = "直营收益")
    private BigDecimal directIncome;

    /**
     * 下级营业额
     */
    @Excel(name = "下级营业额")
    private BigDecimal juniorTurnover;

    /**
     * 下级贡献收益
     */
    @Excel(name = "下级贡献收益")
    private BigDecimal juniorIncome;

    /**
     * 直营退款营业额
     */
    @Excel(name = "直营退款营业额")
    private BigDecimal directRefundTurnover;

    /**
     * 直营退款收益
     */
    @Excel(name = "直营退款收益")
    private BigDecimal directRefundIncome;

    /**
     * 下级退款营业额
     */
    @Excel(name = "下级退款营业额")
    private BigDecimal juniorRefundTurnover;

    /**
     * 下级退款扣除贡献收益
     */
    @Excel(name = "下级退款扣除贡献收益")
    private BigDecimal juniorRefundIncome;

    private Integer point;

    private BigDecimal preincome;

    private Integer icePoint;

    private Date updateTime;



    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }

    public void setFullName(String fullName) {
        this.fullName = fullName;
    }

    public String getFullName() {
        return fullName;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPhone() {
        return phone;
    }

    public void setSubjectType(Long subjectType) {
        this.subjectType = subjectType;
    }

    public Long getSubjectType() {
        return subjectType;
    }

    public void setShareRatio(BigDecimal shareRatio) {
        this.shareRatio = shareRatio;
    }

    public BigDecimal getShareRatio() {
        return shareRatio;
    }

    public void setProjectShareRatio(BigDecimal projectShareRatio) {
        this.projectShareRatio = projectShareRatio;
    }

    public BigDecimal getProjectShareRatio() {
        return projectShareRatio;
    }

    public void setSigningTime(Date signingTime) {
        this.signingTime = signingTime;
    }

    public Date getSigningTime() {
        return signingTime;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getParentId() {
        return parentId;
    }

    public void setProjectId(String projectId) {
        this.projectId = projectId;
    }

    public String getProjectId() {
        return projectId;
    }

    public void setCashoutMoney(BigDecimal cashoutMoney) {
        this.cashoutMoney = cashoutMoney;
    }

    public BigDecimal getCashoutMoney() {
        return cashoutMoney;
    }

    public void setFrozenMoney(BigDecimal frozenMoney) {
        this.frozenMoney = frozenMoney;
    }

    public BigDecimal getFrozenMoney() {
        return frozenMoney;
    }

    public void setAncestors(String ancestors) {
        this.ancestors = ancestors;
    }

    public String getAncestors() {
        return ancestors;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setIsDelete(Integer isDelete) {
        this.isDelete = isDelete;
    }

    public Integer getIsDelete() {
        return isDelete;
    }


    public BigDecimal getDirectTurnover() {
        return directTurnover;
    }

    public void setDirectTurnover(BigDecimal directTurnover) {
        this.directTurnover = directTurnover;
    }

    public BigDecimal getDirectIncome() {
        return directIncome;
    }

    public void setDirectIncome(BigDecimal directIncome) {
        this.directIncome = directIncome;
    }

    public BigDecimal getJuniorTurnover() {
        return juniorTurnover;
    }

    public void setJuniorTurnover(BigDecimal juniorTurnover) {
        this.juniorTurnover = juniorTurnover;
    }

    public BigDecimal getJuniorIncome() {
        return juniorIncome;
    }

    public void setJuniorIncome(BigDecimal juniorIncome) {
        this.juniorIncome = juniorIncome;
    }

    public BigDecimal getDirectRefundTurnover() {
        return directRefundTurnover;
    }

    public void setDirectRefundTurnover(BigDecimal directRefundTurnover) {
        this.directRefundTurnover = directRefundTurnover;
    }

    public BigDecimal getDirectRefundIncome() {
        return directRefundIncome;
    }

    public void setDirectRefundIncome(BigDecimal directRefundIncome) {
        this.directRefundIncome = directRefundIncome;
    }

    public BigDecimal getJuniorRefundTurnover() {
        return juniorRefundTurnover;
    }

    public void setJuniorRefundTurnover(BigDecimal juniorRefundTurnover) {
        this.juniorRefundTurnover = juniorRefundTurnover;
    }

    public BigDecimal getJuniorRefundIncome() {
        return juniorRefundIncome;
    }

    public void setJuniorRefundIncome(BigDecimal juniorRefundIncome) {
        this.juniorRefundIncome = juniorRefundIncome;
    }


    public BigDecimal getPreincome() {
        return preincome;
    }

    public void setPreincome(BigDecimal preincome) {
        this.preincome = preincome;
    }

    public Integer getPoint() {
        return point;
    }

    public void setPoint(Integer point) {
        this.point = point;
    }

    public Integer getIcePoint() {
        return icePoint;
    }

    public void setIcePoint(Integer icePoint) {
        this.icePoint = icePoint;
    }


    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("fullName", getFullName())
                .append("phone", getPhone())
                .append("subjectType", getSubjectType())
                .append("shareRatio", getShareRatio())
                .append("projectShareRatio", getProjectShareRatio())
                .append("signingTime", getSigningTime())
                .append("parentId", getParentId())
                .append("projectId", getProjectId())
                .append("cashoutMoney", getCashoutMoney())
                .append("frozenMoney", getFrozenMoney())
                .append("ancestors", getAncestors())
                .append("remarks", getRemarks())
                .append("isDelete", getIsDelete())
                .toString();
    }
}
